import BaseComponent from "http://component.119safe.cn/component/base.js";

new class Task_List extends BaseComponent
{
	/*
	 * target		跳转目标页面
	 * tid			任务id
	 * refparam		查询参数(翻页、所属楼盘、……)
	 * ctime		创建时间
	 * etime		期望完成时间
	 * atime		实际完成时间
	 * ot			超时标记
	 * role			当前用户角色
	 * memo			处理结果
	 */
	Properties = { "target": null, "tid": null, "refparam": "", "ctime": null, "etime": null, "atime": null, "ot": null, "role": null, "memo": null};

	InnerContainer = "span[demand]";

	render() { super.render(this.constructor.name); }

	Content = `
<div class='col-xs-12' onclick='location.href="./{target}.aspx?id={tid}&refparam={refparam}"'>
	<div class='col-xs-12 col-md-8'>
		<div class='col-xs-8'>
			<div>创建时间：{ctime}</div>
			<div>期望完成：{etime}</div>
			<div class='{ot}'>实际完成：{atime}</div>
		</div>
		<div class='col-xs-4'>
			{role}
		</div>
	</div>

	<div class='col-xs-12 col-md-4'>
		<div class='col-xs-12' style='color:orangered;overflow:hidden;text-overflow:ellipsis;max-height:40px; padding-right:6px'>要求：<span demand></span></div>
	</div>
	<div class='col-xs-12 col-md-4'>
		<div class='col-xs-12' style='color:green;overflow:hidden;text-overflow:ellipsis;max-height:40px; padding-right:6px'>处理：{memo}</div>
	</div>
</div>`;
}().render();
